<template>
  <div class="com-app">
    <com-header v-show="isHeader"></com-header>
    <div v-show="isHeader" class="height_style"></div>
    <router-view ></router-view>
  
    <com-footer v-show="isFooter"></com-footer
    >

  <com-toast v-show="isToast"></com-toast>
  </div>
</template>
<script>
    import Header from './components/header'
    import Footer from './components/footer'
    import Toast from "./components/toast"
   
    export default {
        data: function() {
            return {
                transitionName: 'slide-left'
            }
        },
        created: function() {
            if (this.$route.name === undefined) {
                this.$router.push('/index')
            }
        },
        computed: {
            isFooter: function() {
                return this.$store.state.comm.indexConf.isFooter
            },
            isHeader: function() {

                return this.$store.state.comm.indexConf.isHeader
            },
            title: function() {

                return this.$store.state.comm.indexConf.title;
            },
            isToast: function() {
                return this.$store.state.comm.indexConf.isToast;
            },
            

        },
        components: {
            comHeader:Header,
            comFooter: Footer,
            comToast: Toast,
            
        },
        methods: {}
    }
</script>
<style lang="scss">
   @import "../static/css/app.scss"; 
</style>